<template>
  <div class="container">
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <a @click="$router.go({'name': 'branchDetail'})" href="javascript:;">
            <img src="../../assets/img/ertong.jpg">
            <span>广东医科大学附属妇女儿童医院</span>
          </a>
        </div>
        <div class="swiper-slide">
          <a @click="$router.go({'name': 'branchDetail'})" href="javascript:;">
            <img src="../../assets/img/fuchan.jpg">
            <span>广东医科大学附属妇女儿童医院</span>
          </a>
        </div>
      </div>
      <div class="swiper-pagination"></div>
    </div>
    <div class="bd">
      <div class="weui_grids">
        <a @click="$router.go({'name': 'regDeptList', 'query': {'branchName': ''}})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-tags fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            当天挂号
          </p>
        </a>
        <a @click="$router.go({'name': 'bookDeptList', 'query': {'branchName': ''}})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-stethoscope fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            预约挂号
          </p>
        </a>
<!--         <a @click="$router.go({'name': 'searchBookInfo'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-ticket fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            预约报到
          </p>
        </a> -->
        <a @click="$router.go({'name': 'getBill'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-money fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            就诊缴费
          </p>
        </a>
        <a @click="$router.go({'name': 'getCheck'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-heartbeat fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            取检查单
          </p>
        </a>
        <a @click="$router.go({'name': 'getInspection'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-file-excel-o fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            取检验单
          </p>
        </a>
        <a @click="$router.go({'name': 'getQueue'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-reorder fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            候诊队列
          </p>
        </a>
        <a @click="$router.go({'name': 'getInpatientPrepay'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-life-ring fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            住院预缴金
          </p>
        </a>
        <a @click="$router.go({'name': 'getInpatient'})" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-list-alt fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            住院清单
          </p>
        </a>
        <a @click="goOrderList" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-medkit fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            订单记录
          </p>
        </a>
        <a @click="manageCard" href="javascript:;" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-credit-card fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            诊疗号
          </p>
        </a>
        <a @click="$router.go({'name': 'paperList'})" class="weui_grid">
          <div class="weui_grid_icon">
            <i class="fa fa-tag fa-2x icon-color"></i>
          </div>
          <p class="weui_grid_label">
            满意度调查
          </p>
        </a>
      </div>
    </div>
    <partial name="footer-copyright"></partial>
  </div>
</template>
<style scoped>
.mapPage {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.swiper-container {
  width: 100%;
  height: 196px;
}

.swiper-container img {
  width: 100%;
  height: 100%;
}


/* 仿妇幼原首页风格 */


/*
  图标色彩保留，按顺序左右上下
  style="color:#9366A5;"
  style="color:#2D64CE;"
  style="color:#CC4B48;"
  style="color:#9FB729;"
  style="color:#0BA6E4;"
  style="color:#FF8208;"
  style="color:#756CB7;"
  style="color:#51A79C;"
  style="color:#E46ABD;"
  style="color:#D0960D;"
  style="color:#BDA15E;"
  style="color:#B7645F;"
*/

.icon-color {
  color: #ffffff;
}

.weui_grids {
  margin-top: 5px;
}

.weui_grids a {
  background-color: #B86086;
}

.weui_grid_label {
  color: #ffffff;
}

.weui_grid:after {
  height: 3px;
  border-bottom: 3px solid #ffffff;
}

.weui_grid:before {
  width: 3px;
  border-right: 3px solid #ffffff;
  right: -3px;
}

.weui_grid:after,
.weui_grid:before {
  color: #ffffff;
}
</style>
<script>
import Swiper from '../../../node_modules/swiper/dist/js/swiper.jquery.js'
import { showAlert, showConfirm, showLoadingToast } from '../../vuex/actions'

export default {
  name: 'PortalView',
  vuex: {
    getters: {
      cards: ({ card }) => card.cards
    },
    actions: {
      showAlert,
      showConfirm,
      showLoadingToast
    }
  },
  data: function () {
    return {}
  },
  methods: {
    alert: function () {
      this.showAlert().then(function () {
        console.log('已关闭')
      })
    },
    confirm: function () {
      this.showConfirm().then(function (clickedBtn) {
        console.log('clickedBtn :: ' + clickedBtn)
      })
    },
    toast: function () {
      this.showLoadingToast()
    },
    getFromAjax: function () {
      this.$ajax.get('a1', 'c1').then(function (data) {
        window.alert(JSON.stringify(data))
      })
    },
    showTxMap: function () {
      window.location.href = 'http://map.qq.com/m/place/info/pointx=113.368440&pointy=23.017180&level=16&word=%E5%B9%BF%E4%B8%9C%E7%9C%81%E5%A6%87%E5%B9%BC%E4%BF%9D%E5%81%A5%E9%99%A2(%E7%95%AA%E7%A6%BA%E9%99%A2%E5%8C%BA)&addr=%E5%B9%BF%E4%B8%9C%E7%9C%81%E5%B9%BF%E5%B7%9E%E5%B8%82%E7%95%AA%E7%A6%BA%E5%8C%BA%E5%85%B4%E5%8D%97%E5%A4%A7%E9%81%93521%E5%8F%B7?referer=tengxun&ch=wap-map1.0'
    },
    goRegPoint: function () {
      this.$route.go({ name: 'selectRegPoint' })
    },
    selectCard: function () {
      this.$router.go({ name: 'selectCard' })
    },
    manageCard: function () {
      this.$router.go({ name: 'manageCard' })
    },
    goOrderList: function () {
      this.$router.go({ name: 'orderList' })
    },
    educationType: function () {
      this.$router.go({ name: 'educationType' })
    }
  },
  ready: function () {
    var mySwiper = new Swiper('.swiper-container', {
      direction: 'horizontal',
      loop: true,
      autoplay: 3000 // pagination: '.swiper-pagination'
    })
    this.swiper = mySwiper
  },
  swiper: null
}
</script>
